package fragments;

import java.util.Calendar;

import activities.SetFixedScheduleActivity;
import activities.SetScheduleActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import dataFormat.TimeDayPair;

public class SetFixedScheduleFragment extends ScheduleControlFragment {
	public SetFixedScheduleFragment(boolean isAddScheduleEnabled, Calendar weekCal) {
		super(isAddScheduleEnabled, weekCal);
	}

	@Override
	protected void clickAddSchedule(View view) {
		Bundle bundle = new Bundle();
		Intent intent = new Intent(getActivity(), SetScheduleActivity.class);
		TimeDayPair tdPair = getImgTimeDayPairMap().get(view);
		
		bundle.putInt("time", tdPair.getTime());
		bundle.putInt("day", tdPair.getDay());
		bundle.putInt("setType", 0);
		intent.putExtras(bundle);
		getActivity().startActivityForResult(intent,
				((SetFixedScheduleActivity)getActivity()).SET_SCHEDULE_REQUEST_CODE);
	}
}
